1. Field of the Invention
The present invention generally relates to computers and software, and more particularly, to providing a flexible system and method for generically instrumenting and intercepting any type of application programming interface events.
2. Description of Related Art
As known in the art, the intercepting of application program interface (API) events requires a large amount of tools-specific instrumentation code or relies upon the behavior of shared library dynamic symbol binding. Generally, the characterization code is contained in a shared library, which replaces the actual shared library for which the characterization is needed. The characterization code is for showing the right information about events. In some cases, this tools-specific instrumentation code is kept inside the API shared library. This then requires the addition of another shared communication library to accomplish the communication between the API library and the collection tool.
One well known way to intercept events is to replace the target API library with an “intercept” library that looks (to the system) exactly like the original target API library. Thus, when the application makes calls into the library, the replacement library's entry-point is called by the application, rather than the target library. The replacement library can then log the call (or do whatever it was designed to do), find the target library, load the appropriate entry-point from the target library and call it.
A significant problem with this approach is that each revision of the library requires that the intercept library be kept up to date, and also requires a new version.
Another significant problem is that the internal instrumentation code in the intercept library requires a significant amount of effort to maintain, and is usually only useful for a single collection tool.
Another problem with this approach is that the library being intercepted must be a shared library.
Still another significant problem is that the entry-point for the replacement library and the target library must be carefully maintained because they must be identical.
Until now, systems and methods for intercepting application programming interface events have lacked the ability to provide a flexible interface for intercepting all generic application programming interface events from any type of application programming interface.